$debug:false;

@mixin title-style {
    text-align: center;
    text-shadow: 4px 2px dodgerblue;
}
body {
    width: 100vw;
    height: 100vh;
    display: flex;
    background: linear-gradient(45deg, hsl(210, 85%, 10%), hsl(210, 85%, 20%), hsl(210, 85%, 10%));
    color: aliceblue;
    font-family: '微软雅黑';
}

.main {
    margin: auto;
    display: grid;
    grid-template-rows: 200px 1fr;
    @if $debug==true {outline: 1px solid red;}
    justify-items: center;
    row-gap: 20px;
    min-width: 600px;
}

.display-panel{
 background-color: rgba(30, 143, 255, 0.2);
 width: 80%;
 border-radius: 10px;
 display: flex;
 flex-direction: column;
 align-items: center;
}

.display-panel h1{
    @include title-style
}
.display-panel .time-panel {
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
}

.time-panel {
    font-size: 40px;
    font-weight: 600;
    letter-spacing: 5px;
    text-shadow: 4px 2px dodgerblue;
    .minute{

        justify-self: right;
    }
    .colon{
        width: 20px;
        text-align: center;
    }
}



#control + label {
    font-weight: 600;
    font-size: 16px;
    width: 100px;
    padding: 5px 0;
    margin-top: 20px;
    border-radius: 50px;
    box-sizing: border-box;
    &::after{
      content: '开始';
    }
  }

#control:checked + label{
    &::after{
        content: '暂停';
    }
}

.setting-panel{
    display: grid;
    background-color: rgba(30, 143, 255, 0.2);
    width: 80%;
    grid-template-rows: auto 1fr;
    border-radius: 10px;
    h1{
        @include title-style()
    }
}

.paused{
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    50%{
        opacity: 0;
    }
}

form {
    margin: auto;
    display: grid;
    flex-direction: column;
    align-items: center;
    grid-template-columns: 1fr 2fr;
    column-gap: 20px;
    row-gap: 20px;
}

form > label{
    font-weight: 600;
    font-size: 18;
    position: relative;
    &::after{
        content: ' :';
        font-weight: 900;
    }
}


form>label::before {
    content: "";
    position: absolute;
    left:-10px;
    width: 4px;
    height: 0;
    background-color: dodgerblue !important;
    transition: .1s ease-in-out;
}

form>label:hover::before {
    height: 100%;
}


input.toggle-btn {
    display: none;
}

label.toggle-btn {
    transition: all .2s ease-in-out;
    text-align: center;
    border: 2px solid dodgerblue;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 15px;
}

input.toggle-btn:checked+label {
    background-color: dodgerblue;
}

input[type=text] {
    -webkit-appearance: none;
    outline: none;
    font-size: 18px;
    background: none;
    border: 2px solid dodgerblue;
    border-radius: 5px;
}

input[type=text]:focus {
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
}

.mode-box {
    display: flex;
    justify-content: space-between;
}

.mode-box label {
    width: 35%;
}

.grid-box {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    column-gap: 5px;
    row-gap: 5px;
} 

.grid-box label {
    font-size: 14px;
    padding: 3px 5px;
    width: 20px;
    display: inline-block;
    text-align: center;
    font-weight: 600;
}
.inline-box > *{
    margin-right: 10px;
}

form button {
    grid-column: 2/3;
    padding: 5px 0;
    width: 100px;
    font-size: 16px;
    font-weight:600;
    background: none;
    color: white;
    border: 2px solid dodgerblue;
    border-radius: 50px;
    margin-bottom: 20px;
    box-sizing: border-box;

}

form button:hover {
    background-color: dodgerblue;
}
 
#close-btn{
    border-color: crimson;
    &:hover{
        background-color: crimson;
    }
}